<template>
    <div class="app-container">
        <el-divider content-position="center">机组安全等级评分</el-divider>
        <el-row :gutter="24">
            <el-col :span="12" :xs="12">
                <el-card style="max-width: 480px">
                    <el-descriptions title="" column=1>
                        <el-descriptions-item label="当前机组风险等级">
                            <el-tag type="success" size="small">低</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="机组安全指标评分">
                            <el-tag type="success" size="small">低</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="电厂实时CDF">
                            <el-input v-model="input2" style="max-width: 300px" placeholder="Please input">
                                <template #append>(/堆年)</template>
                            </el-input>
                        </el-descriptions-item>
                        <el-descriptions-item label="电厂实时ICCDP">
                            <el-input v-model="input2" style="max-width: 300px" placeholder="Please input">
                            </el-input>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-card>
            </el-col>
            <el-col :span="12" :xs="12">
                <el-card style="max-width: 480px">
                    <p>高风险：当前风险不可接受，需立即采取措施。</p>
                    <p>中风险：需要控制风险，应尽快完成故障设备维修，同时可能需要采取补偿措施。</p>
                    <p>低风险：当前风险可接受，安排正常维修即可。</p>
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>

<script setup name="Calculateconf">
import { infoCalculateconf, editCalculateconf } from "@/api/factoryInfo/calculateconf/calculateconf";
const { proxy } = getCurrentInstance();
import { ref } from 'vue';

const calculateconfOpen = ref(true);

const data = reactive({
    form: {
    },
    queryParams: {

    },
    rules: {
        max: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
        maxacceptable: [{ required: true, type: 'number', message: "可接受上限值不能为空", trigger: "blur" }],
        min: [{ required: true, type: 'number', message: "可接受下限值不能为空", trigger: "blur" }],
        minacceptable: [{ required: true, type: 'number', message: "最小值不能为空", trigger: "blur" }],
    },
});




const { queryParams, form, rules } = toRefs(data);

function toUnlock() {
    debugger
    calculateconfOpen.value = false;
}


getInfo();
function getInfo() {
    infoCalculateconf({}).then(response => {
        form.value = response.data;
    });
}



function submitForm() {
    proxy.$refs["calculateconfRef"].validate(valid => {
        editCalculateconf(form.value).then(response => {
            proxy.$modal.msgSuccess("修改成功");
            calculateconfOpen.value = true;
            getInfo();
            proxy.$modal.msgSuccess("设置成功");
        });
    });
};



</script>


<style lang='scss' scoped>
.radio {
    margin: 20px;
}
</style>